@extends('admin.public')

@section('content')
    <div class="col-md-12">
        <form data-validate="parsley" method="post" enctype="multipart/form-data">
            {!! csrf_field() !!}
            <section class="panel panel-default">
                <header class="panel-heading">
                    {{ $frame['title'] }}
                    <a href="{{ route('admin.friendlylink.friendlylink') }}" class="btn btn-xs btn-default pull-right">友情链接列表</a>
                </header>
                <div class="panel-body">
                    <p class="text-muted">添加的友情链接将会在前台显示!</p>
                    <div class="form-group">
                        <label>名称</label>
                        <input type="text" class="form-control parsley-validated" data-required="true" name="name"
                               placeholder="请填写友情链接名称">
                    </div>
                    <div class="form-group">
                        <label>超链接</label>
                        <input type="text" class="form-control parsley-validated" data-type="url"
                               data-required="true" name="url" placeholder="请填写友情链接超链接">
                    </div>
                    <div class="form-group pull-in clearfix">
                        <div class="col-sm-6">
                            <label>图片</label>
                            <div class="clearfix"></div>
                            <input type="file" class="filestyle" data-icon="false" data-classButton="btn btn-default"
                                   name="image"
                                   data-classInput="form-control inline v-middle input-s">
                        </div>
                        <div class="col-sm-6">
                            <label>友情链接排序</label>
                            <div class="clearfix"></div>
                            <input class="slider slider-horizontal form-control" type="text" value="1"
                                   data-slider-min="1" data-slider-max="100" data-slider-step="1" data-slider-value="1"
                                   data-slider-orientation="horizontal" name="xindex">
                        </div>
                    </div>

                    <div class="checkbox i-checks">
                        <label>
                            <input type="checkbox" name="status" checked
                                   class="parsley-validated"><i></i> 勾选此项,即开启此友情链接
                        </label>
                    </div>
                </div>
                <footer class="panel-footer text-right bg-light lter">
                    <button type="submit" class="btn btn-success btn-s-xs">保存</button>
                </footer>
            </section>
        </form>
    </div>
@endsection

@section('css')
    <link rel="stylesheet" href="/public/theme/js/slider/slider.css" type="text/css"/>
@endsection

@section('js')
    <!-- slider -->
    <script src="/public/theme/js/slider/bootstrap-slider.js"></script>
    <!-- parsley -->
    <script src="/public/theme/js/parsley/parsley.min.js"></script>
    <script src="/public/theme/js/parsley/parsley.extend.js"></script>
    <!-- file input -->
    <script src="/public/theme/js/file-input/bootstrap-filestyle.min.js"></script>
@endsection